#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>

#define MAX 1024

int main(int argc, char *argv){
	int fd;
	int count;
	char buf[MAX];

	if(fd=open("readme", O_RDONLY, 0644));
	while((count=read(fd, buf, MAX))>0){
		if(write(STDOUT_FILENO, buf, count)!=count){
			perror("write failed");
			
		}
	}	
	
}
